package academic.concordia.bankofquebec.dao.identificationtype;

import java.util.List;

import org.hibernate.SessionFactory;

import academic.concordia.bankofquebec.entity.IdentificationType;

public class IdentificationTypeDAO implements IIdentificationTypeDAO {

	private SessionFactory sessionFactory;
	
	@Override
	public List<IdentificationType> getIdentificationTypes() {
		@SuppressWarnings("unchecked")
		List<IdentificationType> list = getSessionFactory().getCurrentSession().createQuery("from IdentificationType").list();
		return (List<IdentificationType>) list;
	}

	public SessionFactory getSessionFactory() {
		return sessionFactory;
	}

	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}
}
